home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2020 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.3 KB  |  44 lines

  1. Path: hermes.is.co.za!news
  2. From: Wayne Cawood <wcawood@mj.org.za>
  3. Newsgroups: comp.lang.c++
  4. Subject: Help:Memory allocation above 64kbytes
  5. Date: Mon, 15 Jan 1996 16:41:45 +0200
  6. Organization: Johannesburg Electricity
  7. Message-ID: <30FA67A9.31CC@mj.org.za>
  8. NNTP-Posting-Host: 168.89.6.41
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0b5 (Win95; I)
  13.  
  14. Dear Intellectual!
  15.  
  16. I am in desperate need of advice on how to combat the problem of 
  17. addressing memory above 64000 bytes. Nothing I do works. I know the 
  18. borland c++ 3.1 compiler should be able to but I am completely confused 
  19. as to why my computer (and others which I have tried on), bomb OUT when 
  20. I attempt to write to this memory.
  21.  
  22. Here's some code to illustrate the problem.
  23.  
  24. #inlcude <etc>  // If there are any special header files please mention 
  25. them
  26.  
  27. typedef char buffer[64000];
  28.  
  29. void main()
  30. {
  31. char far *BUF;
  32.  
  33. BUF = (char far *)new buffer;
  34.  
  35. }
  36.  
  37. This allocates the memory, but when I try to write to memory, my system 
  38. shuts down. Please Help! ANYBODY!!!!
  39. How do I address the EMS,XMS or what ever MS I am supposed to use!
  40. I have 8megs of extended memory and I can't use it!! How frustrating!!
  41.  
  42. Thanks in advance!
  43. Craig Haworth (Games programmer in training)
  44.